package setting

import (
	"github.com/spf13/viper"
)

type Jwt struct {
	Secret  string
	Timeout int64
}

func (cfg *Cfg) loadJwt(viper *viper.Viper) error {
	jwt := viper.Sub("jwt")
	cfg.Jwt = Jwt{
		Secret:  jwt.GetString("secret"),
		Timeout: jwt.GetInt64("timeout"),
	}
	return nil
}
